﻿using System;
using System.ComponentModel.DataAnnotations;
using Util.Domains.Repositories;

namespace IterationLife.Domains.Sports.Queries {
    /// <summary>
    /// 运动员查询实体
    /// </summary>
    public class SportAthleteQuery : QueryEntityBase {
        /// <summary>
        /// 运动员编号
        /// </summary>
        [Display(Name="运动员编号")]
        public Guid? SportAthleteId { get; set; }
        
        private string _partnerAthleteId = string.Empty;
        /// <summary>
        /// 合作方运动员Id
        /// </summary>
        [Display(Name="合作方运动员Id")]
        public string PartnerAthleteId {
            get { return _partnerAthleteId == null ? string.Empty : _partnerAthleteId.Trim(); }
            set{ _partnerAthleteId=value;}
        }
        
        private string _idCard = string.Empty;
        /// <summary>
        /// 身份证号
        /// </summary>
        [Display(Name="身份证号")]
        public string IdCard {
            get { return _idCard == null ? string.Empty : _idCard.Trim(); }
            set{ _idCard=value;}
        }
        
        private string _nationality = string.Empty;
        /// <summary>
        /// 国籍
        /// </summary>
        [Display(Name="国籍")]
        public string Nationality {
            get { return _nationality == null ? string.Empty : _nationality.Trim(); }
            set{ _nationality=value;}
        }
        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name="性别")]
        public int? Sex { get; set; }
        /// <summary>
        /// 起始生日
        /// </summary>
        [Display( Name = "起始生日" )]
        public DateTime? BeginBirthday { get; set; }
        /// <summary>
        /// 结束生日
        /// </summary>
        [Display( Name = "结束生日" )]
        public DateTime? EndBirthday { get; set; }        
        /// <summary>
        /// 身高cm
        /// </summary>
        [Display(Name="身高cm")]
        public decimal? Stature { get; set; }
        /// <summary>
        /// 体重kg
        /// </summary>
        [Display(Name="体重kg")]
        public decimal? Weight { get; set; }
        
        private string _historyAverageJsonData = string.Empty;
        /// <summary>
        /// 历史平均数据
        /// </summary>
        [Display(Name="历史平均数据")]
        public string HistoryAverageJsonData {
            get { return _historyAverageJsonData == null ? string.Empty : _historyAverageJsonData.Trim(); }
            set{ _historyAverageJsonData=value;}
        }
        /// <summary>
        /// 起始创建时间
        /// </summary>
        [Display( Name = "起始创建时间" )]
        public DateTime? BeginCreationTime { get; set; }
        /// <summary>
        /// 结束创建时间
        /// </summary>
        [Display( Name = "结束创建时间" )]
        public DateTime? EndCreationTime { get; set; }        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name="创建人")]
        public Guid? CreatorId { get; set; }
        /// <summary>
        /// 起始最后修改时间
        /// </summary>
        [Display( Name = "起始最后修改时间" )]
        public DateTime? BeginLastModificationTime { get; set; }
        /// <summary>
        /// 结束最后修改时间
        /// </summary>
        [Display( Name = "结束最后修改时间" )]
        public DateTime? EndLastModificationTime { get; set; }        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display(Name="最后修改人")]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 添加描述
        /// </summary>
        protected override void AddDescriptions() {
            base.AddDescriptions();
            AddDescription( "运动员编号", SportAthleteId );
            AddDescription( "合作方运动员Id", PartnerAthleteId );
            AddDescription( "身份证号", IdCard );
            AddDescription( "国籍", Nationality );
            AddDescription( "性别", Sex );
            AddDescription( "起始生日", BeginBirthday );
            AddDescription( "结束生日", EndBirthday );
            AddDescription( "身高cm", Stature );
            AddDescription( "体重kg", Weight );
            AddDescription( "历史平均数据", HistoryAverageJsonData );
            AddDescription( "起始创建时间", BeginCreationTime );
            AddDescription( "结束创建时间", EndCreationTime );
            AddDescription( "创建人", CreatorId );
            AddDescription( "起始最后修改时间", BeginLastModificationTime );
            AddDescription( "结束最后修改时间", EndLastModificationTime );
            AddDescription( "最后修改人", LastModifierId );
        } 
    }
}
